<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Rejestracja</title>
<link rel="stylesheet" type="text/css" href="styles/forms.css">
<jsp:include page="index.jsp"></jsp:include>
</head>
<body>
<div class = 'content'>
<center>
<h3><font color='green'>
<%
int step = 0;
try{
step = (Integer)session.getAttribute("register_step");
}
catch (NullPointerException e){
	session.setAttribute("register_step", 0);
}
switch(step){
case 1:
	out.println("Bledny kod bezpieczenstwa");
	session.setAttribute("register_step", 0);
	break;
case 2:
	out.println("Niepoprawny email");
	session.setAttribute("register_step", 0);
	break;
case 3:
	out.println("Podaj wszystkie dane");
	session.setAttribute("register_step", 0);
	break;
case 4:
	out.println("Nie zgadzaja sie hasla");
	session.setAttribute("register_step", 0);
	break;
case 5:
	out.println("Uzytkownik o podanej nazwie juz istnieje<br>Wybierz inna");
	session.setAttribute("register_step", 0);
	break;
case 6:
	out.println("Uzytkownik z podanym adresem email juz istnieje<br>Wybierz inny");
	session.setAttribute("register_step", 0);
	break;
}
%>
</font>
</h3>
<form name = "Register" class='form-container'
		action = "Register"
		method = "POST">
		<div class="form-title"><h2>Zarejestruj sie</h2></div>
		<div class="form-title">Nazwa uzytkownika</div>
		<input id = "username" name = "username" type = "text"class="form-field"><br>
		<div class="form-title"> Podaj haslo:</div>
		<input id = "password" name = "password" type = "password" class="form-field"> <br>
		<div class="form-title"> Podaj ponownie haslo:</div>
		<input id = "confirm_password" name = "confirm_password" type = "password" class="form-field" ><br>
		<div class="form-title"> Adres email:</div>
		<input id = "email" name = "email" type = "text" class="form-field" ><br>
		<div class="form-title"> Przepisz kod:</div>
		<input type="text" name="code" class='form-field'><br>
		<img src="Captcha">
		<div class="submit-container">
		<input class="submit-button" type="submit" value="Zarejestruj" />
		</div>
</form>
</center>
</div>
</body>
</html>